﻿using System.IO;
using System.Xml.Serialization;

namespace TallyJ1Announcer.XmlSource
{
	public class IoHelper
	{
		public static T ReadXml<T>(StringReader stream)
		{
			if (stream != null)
			{
				var xmlSerializer = new XmlSerializer(typeof(T));
				return (T)xmlSerializer.Deserialize(stream);
			}
			return default(T);
		}
	}
}